package com.snail.controller;

import com.snail.model.pojo.media.BizContentReview;
import com.snail.model.query.media.ContentReviewQuery;
import com.snail.result.Result;
import com.snail.service.BizContentReviewService;
import com.snail.utils.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Monica
 * @description
 * @date 2025/8/20 20:46
 */
@RestController
@RequestMapping("/contentReview")
public class BizContentReviewController {

    @Autowired
    private BizContentReviewService bizContentReviewService;

    @PostMapping("/worksContentReview")
    public Result<Boolean> worksContentReview(@RequestBody ContentReviewQuery review) {
        Long userId = SecurityUtils.getCurrentUser().getUserId();
        review.setManualReviewerId(userId);
        return Result.success(bizContentReviewService.review(review));
    }
}
